package com.neusoft.neuiotms.dcvm.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.neuiotms.dcvm.model.Alarm;

public interface AlarmRepository extends JpaRepository<Alarm, Long>, CustomizedAlarmRepository {
    List<Alarm> findByAssetCode(String assetCode);

    List<Alarm> findByLocationCode(String locationCode);

    Alarm findOneByAlarmId(String alarmId);

    void deleteByAlarmId(String alarmId);

    long countByLocationCodeIn(List<String> locationCodeArr);

    List<Alarm> findByLocationCodeIn(List<String> locationCodeArray);

    List<Alarm> findByCabinetCode(String cabientCode);

    void deleteBySourceType(Integer type);
}
